case Components.interfaces.gmIService.STATE_CONNECTING:
status = "connecting";
break;
case Components.interfaces.gmIService.STATE_LOGGED_OUT:
status = "logged-out";
break;
case Components.interfaces.gmIService.STATE_LOGGED_IN:
status = "logged-in";
break;
case Components.interfaces.gmIService.STATE_ERROR_PASSWORD:
case Components.interfaces.gmIService.STATE_ERROR_NETWORK:
case Components.interfaces.gmIService.STATE_ERROR_TIMEOUT:
status = "error";
break;
}
return status;
}
this.toUnicode = function(aString)
{
var unicodeConverter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
var externalProtocolService = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService);
if (externalProtocolService)
{
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI((aHref && aHref.startsWith("mailto:") ? aHref : "mailto:"), null, null);